package Set;

import java.util.HashSet;
import java.util.Set;

public class SetDemno1 {
    public static void main(String[] args) {

        Student s1 = new Student("John", 20, "USA");
        Student s2 = new Student("Mary", 21, "UK");
        Student s3 = new Student("Tom", 22, "Canada");
        Student s4 = new Student("John", 20, "USA");

        Set<Student> set = new HashSet<>();
        set.add(s1);
        set.add(s2);
        set.add(s3);
        set.add(s4);

        System.out.println(set); // 3
    }
}
